const express = require('express');

const server = express();

// cookie发送
server.use('/aaa/a.html', (req, res) => {
    res.cookie('user', 'lbj', {
        path: '/aaa',
        maxAge: 30*24*3600*1000
    });
    res.send('ok');
});

server.listen(8080, () => {
    console.log('服务启动成功!');
});

